var photos_home = new Array();
var links_home = new Array();
var ids_home = new Array();
var which_home = 0;
var still_home = 0;
var current_home = 0;
var speed_home = 3000;
var count_home = 2;
			
photos_home[0] = "https://lh3.googleusercontent.com/-uEi7RrZwj5A/VFb9RfaHvKI/AAAAAAAAE1s/tT8ggpzBoNg/s728/728x90bannervps.jpg";
links_home[0] = "http://cuocsongmoi.vn/may-chu-ao/";
ids_home[0] = 1;

photos_home[1] = "https://lh5.googleusercontent.com/-T8IBJxkPiuE/VFb9Ss74LnI/AAAAAAAAE10/TB0ysF4dYp0/s728/728x90bannerserver.png";
links_home[1] = "http://cuocsongmoi.vn/cho-dat-may-chu/";
ids_home[1] = 2;

var preloadedimages_home=new Array();
for (i=0;i<photos_home.length;i++){
preloadedimages_home[i] = new Image();
preloadedimages_home[i].src = photos_home[i];
}

function applyeffect_home(){
if (document.all){
photos_home_lider.filters.revealTrans.Transition = Math.floor(Math.random()*23);
photos_home_lider.filters.revealTrans.stop();
photos_home_lider.filters.revealTrans.apply();
}
}

function playeffect_home(){
if (document.all) {
photos_home_lider.filters.revealTrans.play();
}
}

function rol(v){
still_home=v;
}

function forever_home(){

if(!still_home){
current_home = which_home;
applyeffect_home();
document.images.photos_home_lider.src = photos_home[current_home];
playeffect_home();
which_home++;

if(which_home >= count_home){
which_home = 0;
}
}
}

function go_supplier_home() {
window.open(links_home[current_home]);
}

document.write('<a href="javascript:go_supplier_home()"><img src="'+photos_home[current_home]+'" name="photos_home_lider" style="filter:revealTrans(duration=2,transition=23)" border="0" onMouseOver="rol(1)" onMouseOut="rol(0)" height="90" width="728" /></a>');

setInterval("forever_home()",speed_home);
